//
//  LYEmoticon.swift
//  EmoticonKeyboard
//
//  Created by liuerying on 16/5/31.
//  Copyright © 2016年 liuerying. All rights reserved.
//

import UIKit

class LYEmoticon: NSObject {

    //分组文件夹的名称
    var id : String?
    
    //发送给服务器的特殊表情文本
    var chs :String?
    
    
    //用于本地显示的表情图片
    var png: String?{
    
        didSet{
        
            imagePath = NSBundle.mainBundle().bundlePath + "/Emoticons.bundle/" + "\(id ?? "")/" + "\(png ?? "" )"
        }
    }
    //图片路径
    var imagePath : String?
    
    var code: String?{
    
        didSet{
        
            emoji = code?.emojiStr()
        }
    }
    
    //添加一个emoji 字符属性
    var emoji:String?
    
    //标记模型为删除模型
    var isDelete = false
    
    //标记空
    var isEmpty = false
    init(isEmpty : Bool){
    
        self.isEmpty = isEmpty
        
        super.init()
    }
    
    init(isDelete: Bool) {
        self.isDelete = isDelete
        super.init()
    }
    
    
    
    init(id:String,dict: [String: AnyObject]) {
        super.init()
        
        self.id = id
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
}
